<?php
namespace App\Controllers\Admin;

class BoxController extends ControllerBase{
	
	public function indexAction(){
		$boxes = \App\Models\Box::find();
		
		$this->view->setVar('boxes', $boxes);
		
	}
	
	public function detailAction($id = null){
		
		if($id){
			$box = \App\Models\Box::findFirst($id);
			if(!$box){
				return $this->response->redirect('admin/box');
			}
		}
	}
	
}